#include<iostream>
#include<cmath>
using namespace std;

#include<opencv2/opencv.hpp>
using namespace cv;


int main(int argc, char** argv)
{
    double z[3][3] = {{cos(M_PI/6) , -sin(M_PI/6), 0}, { sin(M_PI/6), cos(M_PI/6), 0}, { 0, 0, 1}}; // 沿Z B轴旋转30度
    double y[3][3] = {{cos(M_PI/4), 0, sin(M_PI/4)}, { 0, 1, 0}, { -sin(M_PI/4), 0, cos(M_PI/4)}}; // 沿Y A轴旋转45度
    double x[3][3] = {{ 1, 0, 0}, {0, cos(M_PI/3) , -sin(M_PI/3)}, {0, sin(M_PI/3), cos(M_PI/3)}}; // 沿X B轴旋转60度
    double v[3][1] = {{1}, {2}, {0}};
    double w[3][1] = {{2}, {-3}, {1}};
    Mat Z(3, 3, CV_64F, z);
    Mat Y(3, 3, CV_64F, y);
    Mat X(3, 3, CV_64F, x);
    Mat V(3, 1, CV_64F, v);
    Mat W(3, 1, CV_64F, w);
    V = Z * V + W;
    V = Y * X * V;
    cout<< V << endl;
}



